package com.emergency.db.domain.staff;


import com.emergency.base.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.*;

//员工详细信息表
@Entity
@Table(name = "bas_staff_detail")
public class StaffDetail extends BaseEntity {

    private String sex;//性别

    private Integer age;//员工年龄

    private String tel;//电话

    private String address;//办公地址

    private String status;//员工状态，枚举 0.离职；1.外调；2.退休

    private String note;//备注

    private String skill;//特殊技能

    private String glory;//获得荣誉

    @JsonIgnore
    @OneToOne(targetEntity = Staff.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "staff_id", referencedColumnName = "id")
    private Staff staff; //员工id（员工总表）

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getSkill() {
        return skill;
    }

    public void setSkill(String skill) {
        this.skill = skill;
    }

    public String getGlory() {
        return glory;
    }

    public void setGlory(String glory) {
        this.glory = glory;
    }

    public Staff getStaff() {
        return staff;
    }

    public void setStaff(Staff staff) {
        this.staff = staff;
    }
}
